<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div class="t_bar">
	<span class="color_red">*</span>
	项目基本情况
</div>
<table class="t_css" id="basic_tab" width="100%" border="0" cellpadding="0" cellspacing="1">
	<col style="width: 25%" />
	<col style="width: 25%" />
	<col style="width: 25%" />
	<col style="width: 25%" />
	<tr class="li_1">
		<td align="right">项目名称：</td>
		<td colspan="3">
			<input type="text" name="proposal/zh_title" id="project_name" style="width: 80%;" class="required" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title"/>" label="项目名称">
		</td>
	</tr>
	<tr>
		<td align="right">归口管理部门：</td>
		<td>
			<c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
			<cpt:tree key="recomend_org_gk" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}"  id="recomend_org" showPattern="all" shieldPattern="0"
				topCheckbox="false" onClick="initTreeValueExt" />
			<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value" class="required" value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
			<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
		</td>

		<td align="right">申请日期：</td>
		<td colspan="2">
			<c:set var="submit_date">
				<x:out select="$xmlData/data/proposal/apply_date_curr" />
			</c:set>
			<cpt:date id="apply_date_curr" name="proposal/submit_date" value="${submit_date}" className="required date" label="申请日期" ></cpt:date>
		</td>
	</tr>
	<tr>
		<td align="right">归口负责人：</td>
		<td> 
		     <input  type="text" label="归口负责人" name="proposal/personchage" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/personchage" />">
		</td>
		<td align="right">归口联系人：</td>
		<td> 
		     <input  type="text" label="归口联系人" name="proposal/contactper" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/contactper" />">
		</td>
	</tr>
	<tr>
		<td align="right">归口通讯地址：</td>
		<td colspan="3"> 
		     <input  type="text" label="归口通讯地址" name="proposal/addresschage" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/addresschage" />">
		</td>
	</tr>
	<tr>
		<td align="right">归口邮政编码：</td>
		<td> 
		     <input  type="text" label="归口邮政编码" name="proposal/postalcode" class="input_css required approveInput" maxlength="6" value="<x:out select="$xmlData/data/proposal/postalcode" />">
		</td>
		<td align="right">归口传真：</td>
		<td> 
		     <input  type="text" label="归口传真" name="proposal/personfox" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/personfox" />">
		</td>
	</tr>
	<tr>
		<td align="right">归口电话：</td>
		<td> 
		     <input  type="text" label="归口电话" name="proposal/putertel" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/putertel" />">
		</td>
		<td align="right">归口电子邮箱：</td>
		<td> 
		     <input  type="text" label="归口电子邮箱" name="proposal/puteremail" class="input_css required email" maxlength="50" value="<x:out select="$xmlData/data/proposal/puteremail" />">
		</td>
	</tr>
	<tr>
		<td align="right">项目开始时间：</td>
		<td>
			<c:set var="start_date">
				<x:out select="$xmlData/data/proposal/start_date" />
			</c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className=" required date   dateCompare:end_date " label="项目开始时间"></cpt:date>
		</td>
		<td align="right">项目结束时间：</td>
		<td>
			<c:set var="end_date">
				<x:out select="$xmlData/data/proposal/end_date" />
			</c:set>
			<cpt:date id="end_date" name="proposal/end_date" value="${end_date}" className=" required date " label="项目结束时间"></cpt:date>
		</td>
	</tr>
<tr>
		<td align="right">项目联系人姓名：</td>
		<td> 
			<%-- <span name="proposal/contact_psn_cname">
				<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_name"/>
		    </span> --%>
		     <input  type="text" label="项目联系人姓名" name="proposal/contact_psn_cname" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
		</td>
		<input type="hidden" name="proposal/contact_psn_tel" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>"/>
		<input type="hidden" name="proposal/contact_psn_email" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>"/>
		<td align="right">联系人手机：</td>
		<td> 
			<%-- <span name="proposal/contact_psn_mobile">
				<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_mobile" />
		    </span> --%>
		    <input type="text" label="联系人手机" name="proposal/contact_psn_mobile" onfocus="InitInput.setNumber(this,11,0,0);" class="input_css required mobile" maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />">
		</td>
	</tr>
	<tr>
		<td align="right">联系人电话：</td>
		<td>
			<input type="text" name="proposal/contsund" class="input_css required" maxlength="20"
				value="<x:out select="$xmlData/data/proposal/contsund"/>" label="联系人电话">
		</td>
		<td align="right">项目申请金额（万元）：</td>
		<td>
			<input type="text" name="proposal/request_money" class="required" id="request_money" onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;"
				value="<x:out select="$xmlData/data/proposal/request_money"/>" label="项目申请金额">
		</td>
	</tr>
	<tr>
		<td align="right">
			项目报审级次：
			<br />
			（省补助资金拨付所属财政局）
		</td>
		<td colspan="3">
			<c:set var="sub_step">{'id':'<x:out select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
			<cpt:tree key="sub_step" cacheable="false" className="hn_iuput_kuang  " readonly="true" value="${sub_step}" label="项目报审级次" id="sub_step" onlyChooseLeaf="false" showPattern="all" shieldPattern="0"
				topCheckbox="true" onClick="initTreeValueExt" />
			<input id="sub_step_value" type="hidden" name="proposal/sub_step_value" class="required" label="项目报审级次" value="<x:out select="$xmlData/data/proposal/sub_step_value" />" />
			<input id="sub_step_name" type="hidden" name="proposal/sub_step_name" value="<x:out select="$xmlData/data/proposal/sub_step_name" />" />
		</td>
	</tr>
	<tr>
		<td align="right">合作单位（家）：</td>
		<td colspan="3">		    
			 <input  type="text" onfocus="InitInput.setNumber(this,2,0,0)" style="text-align: right;" label="合作单位" name="proposal/orgnum" class="input_css required" value="<x:out select="$xmlData/data/proposal/orgnum" />">
		</td>
	</tr>
</table>
<%-- <div class="t_bar">合作单位信息</div>
<table id="inland" border="0" cellspacing="0" cellpadding="0" style="width: 100%" class="table01 t_css">
	<thead>
		<tr>
			<th align="center" width="5%">选择</th>
			<th align="center" width="5%">序号</th>
			<th align="center" width="15%">单位名称</th>
			<th align="center" width="15%">单位地址</th>
			<th align="center" width="15%">合作单位性质</th>
			<th align="center" width="10%">合作形式</th>
			<th align="center" width="10%">合作经费支出（万元）</th>
			<th align="center" width="10%">联系人</th>
			<th align="center" width="15%">电话</th>

		</tr>
	</thead>
	<tbody id="inland_tab">
		<tr style="display: none" align="center">
			<td align="center">
				<input type="radio" class="radiobutton" name="selAttendOrg11">
			</td>
			<td align="center">
				<span name="inlands|inland[0]@seq_no">[index]</span>
			</td>
			<td align="center">
				<input name="inlands|inland[0]|org_name" label="单位名称" type="text" required class="input_css required maxlength:300" style="width: 80%;" maxlength="100" value="" />
			</td>

			<td align="center">
				<input name="inlands|inland[0]|org_address" label="单位地址" type="text" required class="input_css required maxlength:300" style="width: 80%;" maxlength="100" value="" />
			</td>

			<td align="center">
				<input name="inlands|inland[0]|coop_org_type" label="合作单位性质" type="text" required class="input_css required " style="width: 80%;" maxlength="100" value="" />
			</td>

			<td align="center">
				<input name="inlands|inland[0]|coop_formal" label="合作形式" type="text" required class="input_css required " style="width: 80%;" maxlength="100" value="" />
			</td>

			<td align="center">
				<input name="inlands|inland[0]|coop_fund_expend" label="合作经费支出（万元）" type="text" class="input_css required" style="width: 80%;text-align: right;" maxlength="100" value="" onfocus="InitInput.setNumber(this,7,2,2)"  />
			</td>

			<td align="center">
				<input name="inlands|inland[0]|psn_name" label="联系人" type="text" required class="input_css required " maxlength="100" style="width: 80%;" value="" />
			</td>
			<td align="center">
				<input name="inlands|inland[0]|psn_phone" label="电话" type="text" required class="input_css required " maxlength="20" style="width: 80%;" value="" />
			</td>


		</tr>
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/inlands/inland" var="inland">

			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr align="center">
				<td>
					<input type="radio" class="radiobutton" name="selAttendOrg11">
				</td>
				<td align="center">
					<span name="inlands/inland[${flag}${index}]@seq_no">
						<x:out select="$inland/@seq_no" />
					</span>
				</td>
				<td>
					<input name="inlands/inland[${flag}${index}]/org_name" label="单位名称" type="text" required class="input_css required maxlength:100" style="width: 80%;" maxlength="100"
						value="<x:out select="$inland/org_name" />" />
				</td>

				<td align="center">
					<input name="inlands/inland[${flag}${index}]/org_address" label="单位地址" type="text" required class="input_css required maxlength:300" style="width: 80%;" maxlength="100"
						value="<x:out select="$inland/org_address" />" />
				</td>

				<td align="center">
					<input name="inlands/inland[${flag}${index}]/coop_org_type" label="合作单位性质" type="text" required class="input_css required " style="width: 80%;" maxlength="100"
						value="<x:out select="$inland/coop_org_type" />" />
				</td>

				<td align="center">
					<input name="inlands/inland[${flag}${index}]/coop_formal" label="合作形式" type="text" required class="input_css required " style="width: 80%;" maxlength="100"
						value="<x:out select="$inland/coop_formal" />" />
				</td>

				<td align="center">
					<input name="inlands/inland[${flag}${index}]/coop_fund_expend" label="合作经费支出（万元）" type="text" required class="input_css " style="width: 80%;text-align: right;" maxlength="100" onfocus="InitInput.setNumber(this,7,2,2)" 
						value="<x:out select="$inland/coop_fund_expend" />" />
				</td>

				<td>
					<input name="inlands/inland[${flag}${index}]/psn_name" label="联系人" type="text" required class="input_css required " style="width: 80%;" maxlength="100"
						value="<x:out select="$inland/psn_name" />" />
				</td>
				<td>
					<input name="inlands/inland[${flag}${index}]/psn_phone" label="电话" type="text" required class="input_css orgCredit required maxlength:18" style="width: 80%;" maxlength="18"
						value="<x:out select="$inland/psn_phone" />" onfocus="InitInput.setNumber(this,20,0,0);" />
				</td>


			</tr>
			<c:set var="beggerClass"></c:set>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
	</tbody>
</table>

<table width="98%" class="not_table">
	<tr>
		<td>
			<input class="button_02" type="button" name="cmdAddbefore" value="添加" onclick="if(checkTabLimit('inland',99,'参与单位最多只能填写99条')){addNewRow('inland');}try{top.resizeFrame();}catch(e){};" />
			<input class="button_02" name="cmdMovePrev" type="button" value="上移" onclick="movePrev('inland');" />
			<input class="button_02" name="cmdMoveNext" type="button" value="下移" onclick="moveNext('inland');" />
			<input class="button_02" name="cmddel" type="button" value="删除" onclick="deleteSelectedRow('inland','合作单位信息');" />
		</td>
	</tr>
</table> --%>

<script type="text/javascript">
	function initTreeValueExt(treeId, treeNode) {
		if ((treeNode && treeNode.isParent)) {
			scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
			return false;
		}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			str = obj.name + "-" + str;
			obj = obj.parentNode;
		}

		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
	}
</script>
